    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const sendCode = (mobile:any) => {
    return service({
        url: '/user/index/sendCode/' + mobile,
        method: 'post'
    })
};
// 字典表数据
export const getDictList = (typeId:any) => {
    return service({
        url: '/prod/index/getDictList/' + typeId,
        method: 'post'
    })
};
// 商品明细查询
export const getProdandInfoListById = (prodId:any) => {
    return service({
        url: '/prod/index/getProdandInfoListById/' + prodId,
        method: 'post'
    })
};


// 注册接口
export const userReg = (data:any) => {
    return service({
        url: '/user/index/userReg',
        method: 'post',
        data
    })
};

// 登录
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
// 商品分页列表
export const getprodListPage = (data:any) => {
    return service({
        url: '/prod/index/getprodListPage',
        method: 'post',
        data
    })
};
// 商品品牌分页列表
export const getBrandList = (data:any) => {
    return service({
        url: '/prod/brand/getBrandList',
        method: 'post',
        data
    })
};
// 添加商品品牌
export const getAddBrand = (data:any) => {
    return service({
        url: '/prod/brand/getAddBrand',
        method: 'post',
        data
    })
};
// 修改商品状态
export const updateStatus = (data:any) => {
    return service({
        url: '/prod/brand/updateStatus',
        method: 'post',
        data
    })
};
// 商品类型树形列表
export const getTreeList = (data:any) => {
    return service({
        url: '/prod/type/getTreeList',
        method: 'post',
        data
    })
};
//用户树形列表
export const getTreeMenu = () => {
    return service({
        url: '/user/index/getTreeMenu',
        method: 'post',
        
    })
};
// 商户列表
export const getUserList = (data:any) => {
    return service({
        url: '/user/index/getUserList',
        method: 'post',
        data
    })
};
// 添加类型
export const getAddType = (data:any) => {
    return service({
        url: '/prod/type/getAddType',
        method: 'post',
        data
    })
};
// 批量删除
export const getDeleteBatch = (data:any) => {
    return service({
        url: '/prod/index/getDeleteBatch',
        method: 'post',
        data
    })
};
// 添加商品
export const getAddProd = (data:any) => {
    return service({
        url: '/prod/index/getAddProd',
        method: 'post',
        data
    })
};
// 添加商品附件
export const getAddProdAtta = (data:any) => {
    return service({
        url: '/prod/index/getAddProdAtta',
        method: 'post',
        data
    })
};
// 获取树形分类数据
export const getTreeselect = () => {
    return service({
        url: '/prod/type/getTreeselect',
        method: 'post',
        
    })
};

// 订单分页
export const getOrderPage = (data:any) => {
    return service({
        url: '/prod/order/getOrderPage',
        method: 'post',
        data
    })
};
// 商品详情分页
export const getProdInfoList = (data:any) => {
    return service({
        url: '/prod/index/getProdInfoList',
        method: 'post',
        data
    })
};
// 添加订单
export const getAddOrder = (data:any) => {
    return service({
        url: '/prod/order/getAddOrder',
        method: 'post',
        data
    })
};
// 批量删除
export const deleteBatchOrder = (data:any) => {
    return service({
        url: '/prod/order/deleteBatchOrder',
        method: 'post',
        data
    })
};
// 字典列表
export const getDictPage = (data:any) => {
    return service({
        url: '/prod/dict/getDictPage',
        method: 'post',
        data
    })
};
// 添加商品附件
export const getAddProdInfo = (data:any) => {
    return service({
        url: '/prod/index/getAddProdInfo',
        method: 'post',
        data
    })
};
// 商品拼团活动列表
export const getActiveList = (data:any) => {
    return service({
        url: '/team/index/getActiveList',
        method: 'post',
        data
    })
};
// 管理员添加商品拼团活动
export const getAddActive = (data:any) => {
    return service({
        url: '/team/index/getAddActive',
        method: 'post',
        data
    })
};
// 管理员修改商品拼团活动
export const getUpdateActive = (data:any) => {
    return service({
        url: '/team/index/getUpdateActive',
        method: 'post',
        data
    })
};
// 管理员删除商品拼团活动
export const getDeleteByIdActive = (activeId:any) => {
    return service({
        url: '/team/index/getDeleteByIdActive/'+activeId,
        method: 'post',
        
    })
};
// 获取商家参与活动列表
export const getGroupJoinList = (data:any) => {
    return service({
        url: '/team/index/getGroupJoinList',
        method: 'post',
        data
    })
};
// 添加商家参与活动
export const addActiveJoin = (data:any) => {
    return service({
        url: '/team/index/addActiveJoin',
        method: 'post',
        data
    })
};
// 修改商家参与活动
export const updateActiveJoin = (data:any) => {
    return service({
        url: '/team/index/updateActiveJoin',
        method: 'post',
        data
    })
};
// 删除商家参与活动
export const deleteActiveJoin = (joinId:any) => {
    return service({
        url: '/team/index/deleteActiveJoin/'+joinId,
        method: 'post',
        
    })
};
// 添加用户开团/参团列表
export const addActiveRecord = (data:any) => {
    return service({
        url: '/team/index/addActiveRecord',
        method: 'post',
        data
    })
};
// 用户开团/参团列表
export const getRcordsList = (data:any) => {
    return service({
        url: '/team/index/getRcordsList',
        method: 'post',
        data
    })
};


